package com.lin.gram.controller.graphController;

import com.lin.gram.pojo.graphPojo.Applicant;
import com.lin.gram.service.graphService.ApplicantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ChenweiLin
 * @create 2021-05-03 18:04
 */
@RestController
@RequestMapping("/api/applicant")
public class ApplicantController {
    @Autowired
    ApplicantService applicantService;

    @RequestMapping("/find")
    public Applicant findByName(@RequestBody Applicant applicant){
        String name = applicant.getName();

        Applicant app = applicantService.findByName(name);
        System.out.println(app.toString());
        return  app;

    }
}
